<?php

namespace app\controllers;

use yii;
use app\components\BaseController;


class UserController extends BaseController
{
    public $layout = 'main';

    /**
    * 个人中心
    */
    public function actionIndex()
    {
        $userinfo = $this->getCurrentUser();
        // $userinfo = array('openid' => 'o_HQ5t6Ww1EW8qbRmWF2lJUHWhFE', 'uid' => 1, 'username' => 'ta_shuo', 'gender' => 1, 'province' => '福建', 'city' => '厦门', 'headimgurl' => 'http://wx.qlogo.cn/mmopen/rVQIW9nZwdNNibkm1beQlt7eMF45qib7ibsG8dWcgxe7ibnykLOfJMwgmvTvv3oic7plNfdoxOI3RckCYzJRbwheIkvfJZZheEMnc/0');



        return $this->render('index', ['userinfo' => $userinfo, 'title' => '个人中心']);
    }

    public function actionArticle($id)
    {
        return $this->render('article_'.$id);
    }
}